#include<iostream>
using namespace std;
const int N=110;
int m,n;
int main()
{
	int x=0,y=0;
	cin>>x>>y;
	for(int x1=0;x1<x;x1++)
	{
		for(int y1=0;y1<y;y1++)
		{
			for(int x2=x1+1;x2<=x;x2++)
			{
				for(int y2=y1+1;y2<=y;y2++)
				{
					if(x2-x1==y2-y1) m++;
					else n++;
				}
			}
		}
	}
	cout<<m<<" "<<n;
	return 0;
}